﻿/** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* 
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* 
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* 
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
**/

package player {
	import flash.events.Event;
	
	public class WebTVVideoStatusEvent extends Event {

		// Initializing
		public static const VIDEO_INITIALIZED:String = "videoInitialized";

		// General video playback status
		public static const VIDEO_PLAYHEAD_TIME_CHANGED:String = "videoPlayheadTimeChanged";
		
		// Seeking
		public static const SEEKING_COMPLETE:String = "seekingComplete";
		
		// Buffering status
		public static const BUFFER_CHANGED:String = "bufferChanged";
		public static const BUFFERING_STARTED:String = "bufferingStarted";
		public static const BUFFERING_ENDED:String = "bufferingEnded";
		
		// Playback status
		public static const PLAYBACK_STARTED:String = "playbackStarted";
		public static const PLAYBACK_PAUSED:String = "playbackPaused";
		public static const PLAYBACK_RESUMED:String = "playbackResumed";
		public static const PLAYBACK_STOPPED:String = "playbackStopped";
		public static const PLAYBACK_COMPLETED:String = "playbackCompleted";
		public static const PLAYBACK_REPLAYING:String = "playbackReplaying";
		
		// Bitrate
		public static const VIDEO_BITRATE_CHANGED:String = "videoBitrateChanged";
		
		// Error
		public static const PLAYBACK_ERROR:String = "playbackError";
		
		public var playheadTime:Number;
		
		public var bitrate:Number;
		public var bytesLoaded:Number;
		public var bytesTotal:Number;
		public var wholeVideoBytesTotal:Number;
		public var serverSeekBytesStart:Number = 0;

		public function WebTVVideoStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
		}

	}
	
}
